<?php namespace module\base;

use system\model\ReplyBase;

class Message {
	//显示消息录入表单的
	public function SonDisplay() {
		return View::fetch( 'module/base/template/display.html' );
	}

	//将回复内容保存到模块表里
	public function submit( $kid ) {
		$Model            = new ReplyBase();
		$id=$Model->where('kid',$kid)->pluck('id');
		$Model['content'] = Request::post( 'content' );
		$Model['kid']     = $kid;
		$Model['id']     = $id;
		$Model->save();

		return TRUE;
	}

	public function getData($kid)
	{
		return Db::table('reply_base')->where('kid',$kid)->first();
	}
}